﻿using System;
using System.Collections.Generic;
using CodeFirstMVC3.Core;
using CodeFirstMVC3.Core.Validation;
using CodeFirstMVC3.Domain.Model;

namespace CodeFirstMVC3.Domain.Service
{
    public interface IUserService
    {
        IUser New();

        void Add(IUser entity);

        void Edit(IUser entity);

        void Remove(IUser entity);

        IUser Get(int id);

        IUser Get(Func<IUser,bool> predicate);

        int GetCount(Func<IUser, bool> perdicate=null);

        IEnumerable<IUser> GetAll(Func<IUser, bool> predicate=null, int start = 0, int count = ApplicationSettings.PageSize);

        IEnumerable<IValidationMessage> Validate(IUser entity);
    }
}
